<template>
  <div class="home">
    <img src="../../assets/images/student-menu.jpg" />
    <!-- <van-grid :gutter="10">
      <van-grid-item
        v-for="value in 8"
        :key="value"
        icon="photo-o"
        text="文字"
      />
    </van-grid> -->

    <van-grid :column-num="3" :gutter="25" :border="false" :clickable="true">
      <!-- <van-grid-item v-for="value in 8" :key="value" icon="photo-o" text="文字" /> -->
      <van-grid-item
        icon="user-circle-o"
        @click="trafficInfo"
        text="我的信息"
      />
      <van-grid-item icon="friends-o" @click="residentAdd" text="共同居住人" />
      <van-grid-item icon="smile-o" @click="healthAdd" text="每日健康填报" />
      <van-grid-item icon="share-o" @click="returnSchool" text="返校申请" />
      <van-grid-item icon="share-o" @click="returnSchool" text="离校申请" />
    </van-grid>

    <!-- <van-grid  direction="vertical" :column-num="1">
      <van-grid-item icon="user-circle-o" @click="studentList" text="我的信息" />
      <van-grid-item icon="upgrade" @click="healthAdd" text="每日健康填报" />
    </van-grid> -->
    <!-- <van-nav-bar class="blue" title="入连人员自主报备" /> -->
    <!-- <van-tabbar
      v-model="active"
      @change="onChange"
      active-color="#1989fa"
      inactive-color="#000"
    >
      <van-tabbar-item icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item  icon="setting-o" @click="studentList">我的</van-tabbar-item>
    </van-tabbar> -->
  </div>
</template>

<script>
import { areaList } from '@vant/area-data'
import area from '@/libs/area.json'
import { helpUserInsert } from '@/api/self/record'
import { Toast, Dialog } from 'vant'
export default {
  data () {
    return {
      active: 0,
      inactive: {
        active: 'https://img.yzcdn.cn/vant/user-active.png',
        inactive: 'https://img.yzcdn.cn/vant/user-inactive.png'
      }
    }
  },
  mounted () {},
  methods: {
    checkoutArea (item) {},
    onChange (index) {
      this.active = index
    },
    studentList () {
      this.$router.push({
        name: 'student-information',
        query: {
          // sysUserId: '0d5898e9-88ab-429d-94c7-11c5f5621852familyId%3D10063',
          sysUserId: this.$route.query.sysUserId
        }
      })
    },
    healthAdd () {
      this.$router.push({
        name: 'student-health',
        query: { familyId: '10063' }
      })
    },
    residentAdd () {
      this.$router.push({
        name: 'student-resident',
        query: {
          // sysUserId: '0d5898e9-88ab-429d-94c7-11c5f5621852familyId%3D10063',
          // familyId: '10063',
          sysUserId: this.$route.query.sysUserId,
          familyId: this.$route.query.familyId
        }
      })
    },
    trafficInfo () {
      this.$router.push({
        name: 'student-register',
        query: {
          // type: 'edit',
          // sysUserId: '0d5898e9-88ab-429d-94c7-11c5f5621852',
          type: 'edit',
          sysUserId: this.$route.query.sysUserId
        }
      })
    },
    returnSchool () {
      this.$router.push({ name: 'return-school', query: { id: '1' } })
    }
  }
}
</script>
<style lang="less" scoped>
.upload-img-5 {
  margin: 5px 0 90px 0;
}
.upload-img-1 {
  margin: 5px 0 15px 0;
}

.home {
  // background: url('../../assets/images/smtb.jpg') no-repeat;
  height: 100%;

  img {
    // background: url('../../assets/images/smtb.jpg');
    width: 100%;
    height: 40%;
  }
  .dialog-container {
    height: 70vh;
    overflow-y: auto;
  }
  .get-area {
    width: 100%;
    padding: 0 0.8rem;
    font-size: 0.747rem;
    color: #fff;
    background-color: #1989fa;
    border: 0.053rem solid #1989fa;
    height: 2.347rem;
    line-height: 2.347rem;
    text-align: center;
    border-radius: 0.107rem;
    cursor: pointer;
    box-sizing: border-box;
    margin-right: 10px;
  }
  /deep/.van-field__label {
    width: 8em;
  }
  /deep/.van-field__error-message {
    text-align: right;
  }
  .title {
    // font-size: 28px;
    text-indent: 20px;
    padding: 50px 0 20px;
  }
  .container {
    width: 90%;
    height: 80vh;
    overflow-y: auto;
    border: 1px solid #adadad;
    margin: auto;
    .item {
      margin: 10px;
    }
  }
}
.up-and-down {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f1f3f4;
  height: 80px;
  color: #333;
}
.home .blue {
  background-color: transparent;
}
.home .van-cell {
  background-color: transparent;
}
</style>
